package com.yf1706.bean;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.Date;


/**
 * The persistent class for the emp_skill_certificate database table.
 * 
 */
@Entity
@Table(name="emp_skill_certificate")
@NamedQuery(name="EmpSkillCertificate.findAll", query="SELECT e FROM EmpSkillCertificate e")
public class EmpSkillCertificate implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int id;

	@Temporal(TemporalType.DATE)
	@Column(name="begin_date")
	private Date beginDate;

	@Column(name="certificate_name")
	private String certificateName;

	@Temporal(TemporalType.DATE)
	@Column(name="end_date")
	private Date endDate;

	@Temporal(TemporalType.DATE)
	@Column(name="get_date")
	private Date getDate;

	private String remark;

	@ManyToOne
	@JoinColumn(name="skill_id")
	private SkillSetting skillSetting;

	@ManyToOne
	@JoinColumn(name="skill_level_id")
	private SkillLevelSetting skillLevelSetting;

	//bi-directional one-to-one association to Emp
	@OneToOne
	@JSONField(serialize=false)
	@JoinColumn(name="emp_id")
	private Emp emp;

	public EmpSkillCertificate() {
	}


	@Override
	public String toString() {
		return "EmpSkillCertificate [id=" + id + ", beginDate=" + beginDate + ", certificateName=" + certificateName
				+ ", endDate=" + endDate + ", getDate=" + getDate + ", remark=" + remark + ", skillSetting="
				+ skillSetting + ", skillLevelSetting=" + skillLevelSetting + "]";
	}


	public EmpSkillCertificate(Date beginDate, String certificateName, Date endDate, Date getDate, String remark,
			SkillSetting skillSetting, SkillLevelSetting skillLevelSetting) {
		super();
		this.beginDate = beginDate;
		this.certificateName = certificateName;
		this.endDate = endDate;
		this.getDate = getDate;
		this.remark = remark;
		this.skillSetting = skillSetting;
		this.skillLevelSetting = skillLevelSetting;
	}


	public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}


	public Date getBeginDate() {
		return this.beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public String getCertificateName() {
		return this.certificateName;
	}

	public void setCertificateName(String certificateName) {
		this.certificateName = certificateName;
	}

	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public Date getGetDate() {
		return this.getDate;
	}

	public void setGetDate(Date getDate) {
		this.getDate = getDate;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}


	public SkillSetting getSkillSetting() {
		return skillSetting;
	}


	public void setSkillSetting(SkillSetting skillSetting) {
		this.skillSetting = skillSetting;
	}


	public SkillLevelSetting getSkillLevelSetting() {
		return skillLevelSetting;
	}


	public void setSkillLevelSetting(SkillLevelSetting skillLevelSetting) {
		this.skillLevelSetting = skillLevelSetting;
	}


	public Emp getEmp() {
		return this.emp;
	}

	public void setEmp(Emp emp) {
		this.emp = emp;
	}

}